#!/bin/bash
if [ -d ../zhenrongbao/static ];then
rm -rf ../zhenrongbao/static
fi
rm -rf output/
cd common/
fisp release -d ../output
cd ../home/
fisp release -d ../output
cd ../output/
pwd
if [ -d webroot ];then
	'exist webroot'
else
    mkdir webroot
fi
mv static webroot/static
mv plugin customer_plugin
mkdir -p "app/zhenrongbao/protected/extensions/smarty"
mkdir -p "data/smarty/cache"
mkdir -p "data/smarty/template_c"
chmod 777 "data/smarty/cache"
chmod 777 "data/smarty/template_c"
mv customer_plugin "app/zhenrongbao/protected/extensions/smarty"
rm -rf customer_plugin
rm -rf server-conf
mkdir conf
mv config conf/smarty-conf
cp -r webroot/ ../../zhenrongbao/
